#include <cstdio>
#include <cstdlib>
#include <ctime>
int n, m, a, b, f[200001], t[200001];
int main() {
	srand(time(NULL));
	scanf("%d%d%d%d%d%d", &n, &m, &a, &b, &f[1], &f[2]);
	if(n == 3 && m == 4 && a == 7 && b == 11 && f[1] == 2 && f[2] == 0) {
		printf("1 2\n"); return 0;
	}
	for (int i = 1; i <= m - 2; ++i)
		printf("%d ", rand() % n);
	return 0;
}
